package com.welab.springcloud.demo.api;

import com.welab.springcloud.demo.api.fallback.OrderApiFallback;
import com.welab.springcloud.demo.api.fallback.UserApiFallback;
import com.welab.springcloud.demo.dto.Order;
import com.welab.springcloud.demo.dto.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@FeignClient(value = "ORDER-SERVICE", fallback = OrderApiFallback.class)
public interface OrderApi {

    @GetMapping(value = "/getUserOrder/{userId}")
    ResponseResult<List<Order>> getUserOrder(Integer userId);

}
